
/*

Design Pattern Automation Toolkit.
Application to create applications with emphasis on Design patterns.
And support for round trip engineering.
Copyright (C) 2004 Vineeth Neelakant. nvineeth@gmail.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/
using System;using BusinessLayer;using InfoClasses;using dpatoolkit.UILayer;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using dpatoolkit;
namespace dpatoolkit.UILayer
{
	/// <summary>
	/// Summary description for SplashScreen.
	/// </summary>
	public class SplashScreen : System.Windows.Forms.Form
    {
		private System.Windows.Forms.TabControl tabControl;
		private System.Windows.Forms.TabPage Developers;
        private System.Windows.Forms.TabPage Credits;
		private System.Windows.Forms.RichTextBox creditsRichTextBox;
        private PictureBox aboutPictureBox;
        private TableLayoutPanel tableLayoutPanel1;
        private RichTextBox devInfoRichTextBox;
		private System.ComponentModel.IContainer components;

		public SplashScreen(Mode m)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			if( m == Mode.Splash)
			{
				this.tabControl.Visible = false;
			}
			else /* About dialog */
			{
				this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
			}
			
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent() {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SplashScreen));
            this.tabControl = new System.Windows.Forms.TabControl();
            this.Developers = new System.Windows.Forms.TabPage();
            this.devInfoRichTextBox = new System.Windows.Forms.RichTextBox();
            this.Credits = new System.Windows.Forms.TabPage();
            this.creditsRichTextBox = new System.Windows.Forms.RichTextBox();
            this.aboutPictureBox = new System.Windows.Forms.PictureBox();
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.tabControl.SuspendLayout();
            this.Developers.SuspendLayout();
            this.Credits.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.aboutPictureBox)).BeginInit();
            this.tableLayoutPanel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // tabControl
            // 
            this.tabControl.Alignment = System.Windows.Forms.TabAlignment.Bottom;
            this.tabControl.Controls.Add(this.Developers);
            this.tabControl.Controls.Add(this.Credits);
            this.tabControl.Location = new System.Drawing.Point(3, 216);
            this.tabControl.Name = "tabControl";
            this.tabControl.SelectedIndex = 0;
            this.tabControl.Size = new System.Drawing.Size(402, 179);
            this.tabControl.TabIndex = 12;
            // 
            // Developers
            // 
            this.Developers.Controls.Add(this.devInfoRichTextBox);
            this.Developers.Location = new System.Drawing.Point(4, 4);
            this.Developers.Name = "Developers";
            this.Developers.Size = new System.Drawing.Size(394, 153);
            this.Developers.TabIndex = 0;
            this.Developers.Text = "Developers";
            this.Developers.UseVisualStyleBackColor = true;
            // 
            // devInfoRichTextBox
            // 
            this.devInfoRichTextBox.BackColor = System.Drawing.Color.GhostWhite;
            this.devInfoRichTextBox.Location = new System.Drawing.Point(0, 0);
            this.devInfoRichTextBox.Name = "devInfoRichTextBox";
            this.devInfoRichTextBox.Size = new System.Drawing.Size(400, 158);
            this.devInfoRichTextBox.TabIndex = 0;
            this.devInfoRichTextBox.Text = resources.GetString("devInfoRichTextBox.Text");
            // 
            // Credits
            // 
            this.Credits.Controls.Add(this.creditsRichTextBox);
            this.Credits.Location = new System.Drawing.Point(4, 4);
            this.Credits.Name = "Credits";
            this.Credits.Size = new System.Drawing.Size(394, 153);
            this.Credits.TabIndex = 1;
            this.Credits.Text = "Credits";
            this.Credits.UseVisualStyleBackColor = true;
            this.Credits.Visible = false;
            // 
            // creditsRichTextBox
            // 
            this.creditsRichTextBox.BackColor = System.Drawing.Color.GhostWhite;
            this.creditsRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
            this.creditsRichTextBox.Location = new System.Drawing.Point(0, 0);
            this.creditsRichTextBox.Name = "creditsRichTextBox";
            this.creditsRichTextBox.ReadOnly = true;
            this.creditsRichTextBox.Size = new System.Drawing.Size(394, 153);
            this.creditsRichTextBox.TabIndex = 0;
            this.creditsRichTextBox.Text = resources.GetString("creditsRichTextBox.Text");
            // 
            // aboutPictureBox
            // 
            this.aboutPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.aboutPictureBox.Image = global::dpatoolkit.Properties.Resources.splash;
            this.aboutPictureBox.Location = new System.Drawing.Point(3, 3);
            this.aboutPictureBox.Name = "aboutPictureBox";
            this.aboutPictureBox.Size = new System.Drawing.Size(402, 207);
            this.aboutPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.aboutPictureBox.TabIndex = 13;
            this.aboutPictureBox.TabStop = false;
            // 
            // tableLayoutPanel1
            // 
            this.tableLayoutPanel1.AutoSize = true;
            this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.tableLayoutPanel1.ColumnCount = 1;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tableLayoutPanel1.Controls.Add(this.aboutPictureBox, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.tabControl, 0, 1);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 2;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53.51759F));
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 46.48241F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(408, 398);
            this.tableLayoutPanel1.TabIndex = 14;
            // 
            // SplashScreen
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.AutoSize = true;
            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(408, 398);
            this.Controls.Add(this.tableLayoutPanel1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            this.Name = "SplashScreen";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "About";
            this.TopMost = true;
            this.tabControl.ResumeLayout(false);
            this.Developers.ResumeLayout(false);
            this.Credits.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.aboutPictureBox)).EndInit();
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion


		/* The mode in which to display the splash screen
		 * About Dialog or Splash screen
		 */
		public enum Mode
		{
			About,
			Splash
		}
	}
}
